Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update ts bindings #973

Merged
merged 4 commits into from
Oct 17, 2023
Merged

Conversation

chadoh
Copy link
Contributor

@chadoh chadoh commented Sep 18, 2023

What

Update the typescript bindings with all the changes that landed in the futurenet-compatible smartdeploy branch since main stopped working with futurenet.

Why

Lots of good improvements and fixes are not yet in main, including tests for the generated libraries. _CI tests will be included in a future PR; reasonable time-sink exceeded for this one.

Closes: #996

Known limitations

The newly-added tests are not yet being exercised in CI; you can see the commit history for all the details of how we tried to work around this. At this point, we will:

  • wait for Manage history-archive http server with supervisor quickstart#507 to get merged & included in a published quickstart image
  • retry the bindings-ts.yml workflow, which was almost working except that friendbot was not starting properly when quickstart was run in CI (though it does start properly, even if a bit slowly, when quickstart is run locally)
  • after a basic run-tests-with-published-quickstart is working, the next step is to build a custom quickstart image using this repository's RPC version, and use that custom quickstart to run the integration tests. This might be able to be accomplished as described by ChatGPT here.

chadoh added a commit to AhaLabs/soroban-example-dapp that referenced this pull request Sep 19, 2023
- Pin soroban-cli to latest commit from
  stellar/stellar-cli#973. This PR will be
  mergeable once a new quickstart image is released and we can verify
  that its tests pass.
- New CLI's typescript-bindings-generated libraries export a `Contract`
  class, rather than a flat bag of functions. Instantiating these
  contracts is now taken care of in `shared/contracts.ts`, with code
  throughout the rest of the codebase referencing these instances.
- Instantiating these classes required access to the `network` and
  `rpcUrl` used with the `initialize.sh` script. NextJS doesn't allow
  reading the files we already write (like `.soroban-example-dapp/network`),
  so for now I've also `echo`d relevant values to a `shared/config.json`
  file, which is hidden. This could probably be cleaned up in the future
  by putting all relevant settings in an `.env` file, and cleaning up
  the package.json scripts to use `dotenv cross-env` or similar.
chadoh added a commit to AhaLabs/soroban-example-dapp that referenced this pull request Sep 20, 2023
- Pin soroban-cli to latest commit from
  stellar/stellar-cli#973. This PR will be
  mergeable once a new quickstart image is released and we can verify
  that its tests pass.
- Update the contract's SDK version
  - Copy in abundance source from token contract at "Changes for the next
    release," stellar/soroban-examples#277. Note
    that I did not author most of the changes in the contracts/abundance
    folder. I only copied in the changes originally authored by
    @leighmcculloch, then updated for the single tweak that this
    abundance contract already had: 1. comments on the mint method; and
    2.  slightly modified mint behavior.
- New CLI's typescript-bindings-generated libraries export a `Contract`
  class, rather than a flat bag of functions. Instantiating these
  contracts is now taken care of in `shared/contracts.ts`, with code
  throughout the rest of the codebase referencing these instances.
- Instantiating these classes required access to the `network` and
  `rpcUrl` used with the `initialize.sh` script. NextJS doesn't allow
  reading the files we already write (like `.soroban-example-dapp/network`),
  so for now I've also `echo`d relevant values to a `shared/config.json`
  file, which is hidden. This could probably be cleaned up in the future
  by putting all relevant settings in an `.env` file, and cleaning up
  the package.json scripts to use `dotenv cross-env` or similar.
chadoh added a commit to AhaLabs/soroban-example-dapp that referenced this pull request Sep 20, 2023
- Pin soroban-cli to latest commit from
  stellar/stellar-cli#973. This PR will be
  mergeable once a new quickstart image is released and we can verify
  that its tests pass.
- Update the contract's SDK version
  - Copy in abundance source from token contract at "Changes for the next
    release," stellar/soroban-examples#277. Note
    that I did not author most of the changes in the contracts/abundance
    folder. I only copied in the changes originally authored by
    @leighmcculloch, then updated for the single tweak that this
    abundance contract already had: 1. comments on the mint method; and
    2.  slightly modified mint behavior.
- New CLI's typescript-bindings-generated libraries export a `Contract`
  class, rather than a flat bag of functions. Instantiating these
  contracts is now taken care of in `shared/contracts.ts`, with code
  throughout the rest of the codebase referencing these instances.
- Instantiating these classes required access to the `network` and
  `rpcUrl` used with the `initialize.sh` script. NextJS doesn't allow
  reading the files we already write (like `.soroban-example-dapp/network`),
  so for now I've also `echo`d relevant values to a `shared/config.json`
  file, which is hidden. This could probably be cleaned up in the future
  by putting all relevant settings in an `.env` file, and cleaning up
  the package.json scripts to use `dotenv cross-env` or similar.
chadoh added a commit to AhaLabs/soroban-dapps-challenge that referenced this pull request Sep 20, 2023
- copy abundance source from stellar/soroban-example-dapp#136
- pin soroban-cli from stellar/stellar-cli#973
- update everything else as needed
@chadoh chadoh force-pushed the chore/bindings_udate branch from 74e3b90 to c7fb7e0 Compare September 24, 2023 16:00
@chadoh chadoh force-pushed the chore/bindings_udate branch from b7e2eca to 39bb550 Compare September 28, 2023 11:22
@sreuland
Copy link
Contributor

sreuland commented Oct 3, 2023

@chadoh , rather than using quickstart image for server-side stack(core,rpc,etc) it looks like you could just add your new ts tests to the cli_test.go ?

Or in any case use it as a reference for how to run the server-side stack, as that test already spins up a standalone core, funded account, and an instance of rpc built from source code of current branch.

@chadoh chadoh force-pushed the chore/bindings_udate branch 7 times, most recently from 170a796 to 15031c8 Compare October 9, 2023 15:22
@chadoh chadoh marked this pull request as ready for review October 9, 2023 15:22
@chadoh chadoh force-pushed the chore/bindings_udate branch from 55ef601 to 9ec6baf Compare October 9, 2023 19:06
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Oct 9, 2023
Add tests from #11 which didn't make it into stellar#973 due to the quickstart image not starting properly in CI.

Adding this directly to stellar#973 was costing too much time. We can troubleshoot quickstart issues here.
What
----

Update the typescript bindings with all the changes that landed in the futurenet-compatible `smartdeploy` branch since `main` stopped working with futurenet.

Why
---

Lots of good improvements and fixes are not yet in `main`, ~including tests for the generated libraries.~ _CI tests will be included in a future PR; reasonable time-sink exceeded for this one.

Closes: stellar#996

Known limitations
-----------------

The newly-added tests are not yet being exercised in CI; you can see the commit history for all the details of how we tried to work around this. At this point, we will:

- wait for stellar/quickstart#507 to get merged & included in a published quickstart image
- retry the `bindings-ts.yml` workflow, which was almost working except that friendbot was not starting properly when quickstart was run _in CI_ (though it does start properly, even if a bit slowly, when quickstart is run locally)
- after a basic run-tests-with-published-quickstart is working, the next step is to build a custom quickstart image using _this repository's_ RPC version, and use that custom quickstart to run the integration tests. This might be able to be accomplished [as described by ChatGPT here](https://chat.openai.com/share/0f355fbe-93b9-4c8d-9c12-7f54846134bd).
@chadoh chadoh force-pushed the chore/bindings_udate branch from 486fca1 to 779f04c Compare October 16, 2023 18:06
@tsachiherman tsachiherman merged commit b15f0da into stellar:main Oct 17, 2023
22 checks passed
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Oct 19, 2023
Add tests from #11 which didn't make it into stellar#973 due to the quickstart image not starting properly in CI.

Adding this directly to stellar#973 was costing too much time. We can troubleshoot quickstart issues here.
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Oct 19, 2023
* chore: update ts bindings

What
----

Update the typescript bindings with all the changes that landed in the futurenet-compatible `smartdeploy` branch since `main` stopped working with futurenet.

Why
---

Lots of good improvements and fixes are not yet in `main`, ~including tests for the generated libraries.~ _CI tests will be included in a future PR; reasonable time-sink exceeded for this one.

Closes: stellar#996

Known limitations
-----------------

The newly-added tests are not yet being exercised in CI; you can see the commit history for all the details of how we tried to work around this. At this point, we will:

- wait for stellar/quickstart#507 to get merged & included in a published quickstart image
- retry the `bindings-ts.yml` workflow, which was almost working except that friendbot was not starting properly when quickstart was run _in CI_ (though it does start properly, even if a bit slowly, when quickstart is run locally)
- after a basic run-tests-with-published-quickstart is working, the next step is to build a custom quickstart image using _this repository's_ RPC version, and use that custom quickstart to run the integration tests. This might be able to be accomplished [as described by ChatGPT here](https://chat.openai.com/share/0f355fbe-93b9-4c8d-9c12-7f54846134bd).

* build: bump delta for flaky test

* build: increase deltas in cli simulation test

---------

Co-authored-by: Willem Wyndham <[email protected]>
Co-authored-by: Tsachi Herman <[email protected]>
tsachiherman added a commit that referenced this pull request Oct 20, 2023
* chore: update ts bindings

What
----

Update the typescript bindings with all the changes that landed in the futurenet-compatible `smartdeploy` branch since `main` stopped working with futurenet.

Why
---

Lots of good improvements and fixes are not yet in `main`, ~including tests for the generated libraries.~ _CI tests will be included in a future PR; reasonable time-sink exceeded for this one.

Closes: #996

Known limitations
-----------------

The newly-added tests are not yet being exercised in CI; you can see the commit history for all the details of how we tried to work around this. At this point, we will:

- wait for stellar/quickstart#507 to get merged & included in a published quickstart image
- retry the `bindings-ts.yml` workflow, which was almost working except that friendbot was not starting properly when quickstart was run _in CI_ (though it does start properly, even if a bit slowly, when quickstart is run locally)
- after a basic run-tests-with-published-quickstart is working, the next step is to build a custom quickstart image using _this repository's_ RPC version, and use that custom quickstart to run the integration tests. This might be able to be accomplished [as described by ChatGPT here](https://chat.openai.com/share/0f355fbe-93b9-4c8d-9c12-7f54846134bd).

* build: bump delta for flaky test

* build: increase deltas in cli simulation test

---------

Co-authored-by: Willem Wyndham <[email protected]>
Co-authored-by: Tsachi Herman <[email protected]>
@willemneal willemneal deleted the chore/bindings_udate branch October 20, 2023 21:23
chadoh added a commit that referenced this pull request Nov 20, 2023
Add tests from AhaLabs#11 which didn't make it into #973 due to the quickstart image not starting properly in CI.

Adding this directly to #973 was costing too much time. We can troubleshoot quickstart issues here.
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Nov 20, 2023
Add tests from #11 which didn't make it into stellar#973 due to the quickstart image not starting properly in CI.

Adding this directly to stellar#973 was costing too much time. We can troubleshoot quickstart issues here.
maxymkotko added a commit to maxymkotko/Soroban-dApp that referenced this pull request Dec 13, 2023
- Pin soroban-cli to latest commit from
  stellar/stellar-cli#973. This PR will be
  mergeable once a new quickstart image is released and we can verify
  that its tests pass.
- Update the contract's SDK version
  - Copy in abundance source from token contract at "Changes for the next
    release," stellar/soroban-examples#277. Note
    that I did not author most of the changes in the contracts/abundance
    folder. I only copied in the changes originally authored by
    @leighmcculloch, then updated for the single tweak that this
    abundance contract already had: 1. comments on the mint method; and
    2.  slightly modified mint behavior.
- New CLI's typescript-bindings-generated libraries export a `Contract`
  class, rather than a flat bag of functions. Instantiating these
  contracts is now taken care of in `shared/contracts.ts`, with code
  throughout the rest of the codebase referencing these instances.
- Instantiating these classes required access to the `network` and
  `rpcUrl` used with the `initialize.sh` script. NextJS doesn't allow
  reading the files we already write (like `.soroban-example-dapp/network`),
  so for now I've also `echo`d relevant values to a `shared/config.json`
  file, which is hidden. This could probably be cleaned up in the future
  by putting all relevant settings in an `.env` file, and cleaning up
  the package.json scripts to use `dotenv cross-env` or similar.
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Jan 5, 2024
Add tests from #11 which didn't make it into stellar#973 due to the quickstart image not starting properly in CI.

Adding this directly to stellar#973 was costing too much time. We can troubleshoot quickstart issues here.
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Jan 5, 2024
Add tests from #11 which didn't make it into stellar#973 due to the quickstart image not starting properly in CI.

Adding this directly to stellar#973 was costing too much time. We can troubleshoot quickstart issues here.
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Jan 11, 2024
Add tests from #11 which didn't make it into stellar#973 due to the quickstart image not starting properly in CI.

Adding this directly to stellar#973 was costing too much time. We can troubleshoot quickstart issues here.
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Jan 11, 2024
Add tests from #11 which didn't make it into stellar#973 due to the quickstart image not starting properly in CI.

Adding this directly to stellar#973 was costing too much time. We can troubleshoot quickstart issues here.

Update for latest changes from `soroban config identity` to `soroban
keys`
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Jan 11, 2024
Add tests from #11 which didn't make it into stellar#973 due to the quickstart image not starting properly in CI.

Adding this directly to stellar#973 was costing too much time. We can troubleshoot quickstart issues here.

Update for latest changes from `soroban config identity` to `soroban
keys`
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Jan 11, 2024
Add tests from #11 which didn't make it into stellar#973 due to the quickstart image not starting properly in CI.

Adding this directly to stellar#973 was costing too much time. We can troubleshoot quickstart issues here.

Update for latest changes from `soroban config identity` to `soroban
keys`
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Jan 11, 2024
Add tests from #11 which didn't make it into stellar#973 due to the quickstart image not starting properly in CI.

Adding this directly to stellar#973 was costing too much time. We can troubleshoot quickstart issues here.

Update for latest changes from `soroban config identity` to `soroban
keys`
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Jan 11, 2024
Add tests from #11 which didn't make it into stellar#973 due to the quickstart image not starting properly in CI.

Adding this directly to stellar#973 was costing too much time. We can troubleshoot quickstart issues here.

Update for latest changes from `soroban config identity` to `soroban
keys`
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Jan 11, 2024
Add tests from #11 which didn't make it into stellar#973 due to the quickstart image not starting properly in CI.

Adding this directly to stellar#973 was costing too much time. We can troubleshoot quickstart issues here.

Update for latest changes from `soroban config identity` to `soroban
keys`
chadoh added a commit to AhaLabs/stellar-cli that referenced this pull request Jan 12, 2024
Add tests from #11 which didn't make it into stellar#973 due to the quickstart image not starting properly in CI.

Adding this directly to stellar#973 was costing too much time. We can troubleshoot quickstart issues here.

Update for latest changes from `soroban config identity` to `soroban
keys`
Shaptic pushed a commit that referenced this pull request Jan 12, 2024
* Add tests from AhaLabs#11 which didn't make it into #973 due to the quickstart image not starting properly in CI.

* Update for latest changes from `soroban config identity` to `soroban keys`
spotlight301 pushed a commit to spotlight301/Dapp-Soro that referenced this pull request Sep 30, 2024
- Pin soroban-cli to latest commit from
  stellar/stellar-cli#973. This PR will be
  mergeable once a new quickstart image is released and we can verify
  that its tests pass.
- Update the contract's SDK version
  - Copy in abundance source from token contract at "Changes for the next
    release," stellar/soroban-examples#277. Note
    that I did not author most of the changes in the contracts/abundance
    folder. I only copied in the changes originally authored by
    @leighmcculloch, then updated for the single tweak that this
    abundance contract already had: 1. comments on the mint method; and
    2.  slightly modified mint behavior.
- New CLI's typescript-bindings-generated libraries export a `Contract`
  class, rather than a flat bag of functions. Instantiating these
  contracts is now taken care of in `shared/contracts.ts`, with code
  throughout the rest of the codebase referencing these instances.
- Instantiating these classes required access to the `network` and
  `rpcUrl` used with the `initialize.sh` script. NextJS doesn't allow
  reading the files we already write (like `.soroban-example-dapp/network`),
  so for now I've also `echo`d relevant values to a `shared/config.json`
  file, which is hidden. This could probably be cleaned up in the future
  by putting all relevant settings in an `.env` file, and cleaning up
  the package.json scripts to use `dotenv cross-env` or similar.
joaovmp pushed a commit to joaovmp/Soroban_dapp that referenced this pull request Oct 23, 2024
- Pin soroban-cli to latest commit from
  stellar/stellar-cli#973. This PR will be
  mergeable once a new quickstart image is released and we can verify
  that its tests pass.
- Update the contract's SDK version
  - Copy in abundance source from token contract at "Changes for the next
    release," stellar/soroban-examples#277. Note
    that I did not author most of the changes in the contracts/abundance
    folder. I only copied in the changes originally authored by
    @leighmcculloch, then updated for the single tweak that this
    abundance contract already had: 1. comments on the mint method; and
    2.  slightly modified mint behavior.
- New CLI's typescript-bindings-generated libraries export a `Contract`
  class, rather than a flat bag of functions. Instantiating these
  contracts is now taken care of in `shared/contracts.ts`, with code
  throughout the rest of the codebase referencing these instances.
- Instantiating these classes required access to the `network` and
  `rpcUrl` used with the `initialize.sh` script. NextJS doesn't allow
  reading the files we already write (like `.soroban-example-dapp/network`),
  so for now I've also `echo`d relevant values to a `shared/config.json`
  file, which is hidden. This could probably be cleaned up in the future
  by putting all relevant settings in an `.env` file, and cleaning up
  the package.json scripts to use `dotenv cross-env` or similar.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CLI: integration test, ts bindings
5 participants